//
//  InstitutionAppointModel.swift
//  Venus
//
//  Created by qurongxiang on 2018/9/8.
//  Copyright © 2018年 zhaowang. All rights reserved.
//

import UIKit
import SwiftyJSON


class InstitutionAppointModel: NSObject {
    var userName:String = ""
    var headImg:String = ""
    var appointmentTime:String = ""
    var remark:String = ""
    var id:String = "" //这个是用户的ID
    override init() {
        
    }
    
    /// 格式化数据
    ///
    /// - Parameter json:
    /// - Returns:
    class func formatModel(json:JSON!) -> [InstitutionAppointModel] {
        var modelArr:[InstitutionAppointModel] = [InstitutionAppointModel]()
        if json.isEmpty{ return modelArr }
        let arr =  json["data"].arrayValue
        
        for resourceJson in arr{
            let model = InstitutionAppointModel()
            model.userName = resourceJson["userName"].stringValue
            model.headImg = resourceJson["headImg"].stringValue
            model.appointmentTime = resourceJson["appointmentTime"].stringValue
            model.remark = resourceJson["remark"].stringValue
            model.id = resourceJson["id"].stringValue
            modelArr.append(model)
        }
        return modelArr
    }
    
}
